package cn.gson.fengboot.model.pojos;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

@Entity
public class Lwxzb {

    private int gdId;//工单id
    private String gdLsh;//工单流水号
    private Date gd_Jiedanrq;//接单日期
    private String gdLeixing;//工单类型
    private String gdChengjiebumen;//承接部门
    private String gdZhuangtai;//工单状态
    private String gdBaoxiu;//保修
    private String gdJingdu;//工单进度
    private Integer gdLuojisc;//工单状态
    private TfylinkmanForm linkmanId;//联系人对象
    private Zorder orderId;//订单对象
    private TfyclientForm clientId;//客户对象
    private QempFrom empId;//员工对象
    private  List<Lwxcb>  gdxbId;//从表
    private Qproductdetail prodetailId;//产品对象

    @OneToMany
    @JoinColumn(name = "gdxb_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public List<Lwxcb> getGdxbId() {
        return gdxbId;
    }

    public void setGdxbId(List<Lwxcb> gdxbId) {
        this.gdxbId = gdxbId;
    }

    //一个联系人有多个维修工单，多对一
    @ManyToOne
    @JoinColumn(name = "linkman_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public TfylinkmanForm getLinkmanId() {
        return linkmanId;
    }

    public void setLinkmanId(TfylinkmanForm linkmanId) {
        this.linkmanId = linkmanId;
    }

    //一个订单有多个维修工单，多对一
    @ManyToOne
    @JoinColumn(name = "order_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Zorder getOrderId() {
        return orderId;
    }

    public void setOrderId(Zorder orderId) {
        this.orderId = orderId;
    }


    //一个产品可以有多个维修工单，多对一
    @ManyToOne
    @JoinColumn(name = "prodetail_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Qproductdetail getProdetailId() {
        return prodetailId;
    }

    public void setProdetailId(Qproductdetail prodetailId) {
        this.prodetailId = prodetailId;
    }


    //一个客户可以有多个维修工单，多对一
    @ManyToOne
    @JoinColumn(name = "client_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public TfyclientForm getClientId() {
        return clientId;
    }

    public void setClientId(TfyclientForm clientId) {
        this.clientId = clientId;
    }

    //一个员工可以负责多个维修工单，多对一
    @ManyToOne
    @JoinColumn(name = "emp_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public QempFrom getEmpId() {
        return empId;
    }

    public void setEmpId(QempFrom empId) {
        this.empId = empId;
    }

    @Basic
    @Column(name = "gd_jiedanrq")
    public Date getGd_Jiedanrq() {
        return gd_Jiedanrq;
    }

    public void setGd_Jiedanrq(Date gd_Jiedanrq) {
        this.gd_Jiedanrq = gd_Jiedanrq;
    }

    @Basic
    @Column(name = "gd_leixing")
    public String getGdLeixing() {
        return gdLeixing;
    }

    public void setGdLeixing(String gdLeixing) {
        this.gdLeixing = gdLeixing;
    }

    @Basic
    @Column(name = "gd_chengjiebumen")
    public String getGdChengjiebumen() {
        return gdChengjiebumen;
    }

    public void setGdChengjiebumen(String gdChengjiebumen) {
        this.gdChengjiebumen = gdChengjiebumen;
    }

    @Basic
    @Column(name = "gd_zhuangtai")
    public String getGdZhuangtai() {
        return gdZhuangtai;
    }

    public void setGdZhuangtai(String gdZhuangtai) {
        this.gdZhuangtai = gdZhuangtai;
    }

    @Basic
    @Column(name = "gd_baoxiu")
    public String getGdBaoxiu() {
        return gdBaoxiu;
    }

    public void setGdBaoxiu(String gdBaoxiu) {
        this.gdBaoxiu = gdBaoxiu;
    }

    @Id
    @Column(name = "gd_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public int getGdId() {
        return gdId;
    }

    public void setGdId(int gdId) {
        this.gdId = gdId;
    }
    @Basic
    @Column(name = "gd_lsh")
    public String getGdLsh() {
        return gdLsh;
    }

    public void setGdLsh(String gdLsh) {
        this.gdLsh = gdLsh;
    }

    @Basic
    @Column(name = "gd_jingdu")
    public String getGdJingdu() {
        return gdJingdu;
    }

    public void setGdJingdu(String gdJingdu) {
        this.gdJingdu = gdJingdu;
    }



    @Basic
    @Column(name = "gd_luojisc")
    public Integer getGdLuojisc() {
        return gdLuojisc;
    }

    public void setGdLuojisc(Integer gdLuojisc) {
        this.gdLuojisc = gdLuojisc;
    }
}

